home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1999 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'VCLZip.pas' rev: 5.00
-
- #ifndef VCLZipHPP
- #define VCLZipHPP
-
- #pragma delphiheader begin
- #pragma option push -w-
- #pragma option push -Vx
- #include <kpZcnst.hpp> // Pascal unit
- #include <kpMatch.hpp> // Pascal unit
- #include <kpZipObj.hpp> // Pascal unit
- #include <VCLUnZip.hpp> // Pascal unit
- #include <KpLib.hpp> // Pascal unit
- #include <Controls.hpp> // Pascal unit
- #include <Forms.hpp> // Pascal unit
- #include <Dialogs.hpp> // Pascal unit
- #include <Classes.hpp> // Pascal unit
- #include <Messages.hpp> // Pascal unit
- #include <SysUtils.hpp> // Pascal unit
- #include <Windows.hpp> // Pascal unit
- #include <SysInit.hpp> // Pascal unit
- #include <System.hpp> // Pascal unit
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Vclzip
- {
- //-- type declarations -------------------------------------------------------
- typedef Word usigned;
-
- typedef Word WPos;
-
- typedef Word IPos;
-
- typedef Byte uch;
-
- class DELPHICLASS EInvalidMatch;
- class PASCALIMPLEMENTATION EInvalidMatch : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- #pragma option push -w-inl
- /* Exception.Create */ inline __fastcall EInvalidMatch(const AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- #pragma option pop
- #pragma option push -w-inl
- /* Exception.CreateFmt */ inline __fastcall EInvalidMatch(const AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- #pragma option pop
- #pragma option push -w-inl
- /* Exception.CreateRes */ inline __fastcall EInvalidMatch(int Ident)/* overload */ : Sysutils::Exception(
- Ident) { }
- #pragma option pop
- #pragma option push -w-inl
- /* Exception.CreateResFmt */ inline __fastcall EInvalidMatch(int Ident, const System::TVarRec * Args
- , const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
- #pragma option pop
- #pragma option push -w-inl
- /* Exception.CreateHelp */ inline __fastcall EInvalidMatch(const AnsiString Msg, int AHelpContext) :
- Sysutils::Exception(Msg, AHelpContext) { }
- #pragma option pop
- #pragma option push -w-inl
- /* Exception.CreateFmtHelp */ inline __fastcall EInvalidMatch(const AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- #pragma option pop
- #pragma option push -w-inl
- /* Exception.CreateResHelp */ inline __fastcall EInvalidMatch(int Ident, int AHelpContext)/* overload */
- : Sysutils::Exception(Ident, AHelpContext) { }
- #pragma option pop
- #pragma option push -w-inl
- /* Exception.CreateResFmtHelp */ inline __fastcall EInvalidMatch(System::PResStringRec ResStringRec
- , const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(
- ResStringRec, Args, Args_Size, AHelpContext) { }
- #pragma option pop
-
- public:
- #pragma option push -w-inl
- /* TObject.Destroy */ inline __fastcall virtual ~EInvalidMatch(void) { }
- #pragma option pop
-
- };
-
-
- struct ct_data;
- typedef ct_data *ct_dataPtr;
-
- struct VCLZip__2
- {
-
- union
- {
- struct
- {
- Word code;
-
- };
- struct
- {
- Word freq;
-
- };
-
- };
- } ;
-
- struct VCLZip__3
- {
-
- union
- {
- struct
- {
- Word len;
-
- };
- struct
- {
- Word dad;
-
- };
-
- };
- } ;
-
- #pragma pack(push, 1)
- struct ct_data
- {
- VCLZip__2 fc;
- VCLZip__3 dl;
- } ;
- #pragma pack(pop)
-
- typedef ct_data ct_dataArray[16383];
-
- typedef ct_data *ct_dataArrayPtr;
-
- typedef ct_data static_ltree_type[288];
-
- typedef ct_data *static_ltreePtr;
-
- typedef ct_data static_dtree_type[30];
-
- typedef ct_data *static_dtreePtr;
-
- typedef Byte windowtype[65536];
-
- typedef Byte *windowtypePtr;
-
- typedef Word prevtype[32768];
-
- typedef Word *prevtypePtr;
-
- typedef Word headtype[32768];
-
- typedef Word *headtypePtr;
-
- typedef Byte l_buftype[32768];
-
- typedef Byte *l_buftypePtr;
-
- typedef Word d_buftype[32768];
-
- typedef Word *d_buftypePtr;
-
- typedef Byte flag_buftype[4096];
-
- typedef Byte *flag_buftypePtr;
-
- #pragma option push -b-
- enum TZipAction { zaUpdate, zaReplace, zaFreshen };
- #pragma option pop
-
- typedef void __fastcall (__closure *TStartZipInfo)(System::TObject* Sender, int NumFiles, double TotalBytes
- , Kpzipobj::TEndCentral* &EndCentralRecord, bool &StopNow);
-
- typedef void __fastcall (__closure *TStartZipEvent)(System::TObject* Sender, AnsiString FName, Kpzipobj::TZipHeaderInfo*
- &ZipHeader, bool &Skip);
-
- typedef void __fastcall (__closure *TEndZipFileEvent)(System::TObject* Sender, AnsiString FName, int
- UncompressedSize, int CompressedSize, int CurrentZipSize);
-
- typedef void __fastcall (__closure *TDisposeEvent)(System::TObject* Sender, AnsiString FName, bool &
- Skip);
-
- typedef void __fastcall (__closure *TDeleteEvent)(System::TObject* Sender, AnsiString FName, bool &Skip
- );
-
- typedef void __fastcall (__closure *TNoSuchFileEvent)(System::TObject* Sender, AnsiString FName);
-
- typedef void __fastcall (__closure *TZipComplete)(System::TObject* Sender, int FileCount);
-
- #pragma option push -b-
- enum TUpdateAction { uaReplacing, uaKeeping };
- #pragma option pop
-
- typedef void __fastcall (__closure *TUpdateEvent)(System::TObject* Sender, TUpdateAction UDAction, int
- FileIndex);
-
- typedef void __fastcall (__closure *TPrepareNextDisk)(System::TObject* Sender, int DiskNum);
-
- typedef void __fastcall (__closure *TOnRecursingFile)(System::TObject* Sender, AnsiString FName);
-
- class DELPHICLASS TMultiZipInfo;
- class PASCALIMPLEMENTATION TMultiZipInfo : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- int FBlockSize;
- int FFirstBlockSize;
- int FSaveOnFirstDisk;
- bool FSaveZipInfo;
- Vclunzip::TMultiMode FMultiMode;
- bool FCheckDiskLabels;
- bool FWriteDiskLabels;
-
- public:
- __fastcall TMultiZipInfo(void);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
-
- __published:
- __property int BlockSize = {read=FBlockSize, write=FBlockSize, default=1457600};
- __property int FirstBlockSize = {read=FFirstBlockSize, write=FFirstBlockSize, default=1457600};
- __property int SaveOnFirstDisk = {read=FSaveOnFirstDisk, write=FSaveOnFirstDisk, default=0};
- __property bool SaveZipInfoOnFirstDisk = {read=FSaveZipInfo, write=FSaveZipInfo, default=0};
- __property Vclunzip::TMultiMode MultiMode = {read=FMultiMode, write=FMultiMode, default=0};
- __property bool CheckDiskLabels = {read=FCheckDiskLabels, write=FCheckDiskLabels, default=1};
- __property bool WriteDiskLabels = {read=FWriteDiskLabels, write=FWriteDiskLabels, default=1};
- public:
-
- #pragma option push -w-inl
- /* TPersistent.Destroy */ inline __fastcall virtual ~TMultiZipInfo(void) { }
- #pragma option pop
-
- };
-
-
- class DELPHICLASS TVCLZip;
- class PASCALIMPLEMENTATION TVCLZip : public Vclunzip::TVCLUnZip
- {
- typedef Vclunzip::TVCLUnZip inherited;
-
- private:
- int FPackLevel;
- bool FRecurse;
- bool FDispose;
- bool FStorePaths;
- bool FRelativePaths;
- bool FStoreVolumes;
- TZipAction FZipAction;
- int FBlockSize;
- TMultiZipInfo* FMultiZipInfo;
- bool FStore83Names;
- AnsiString FTempPath;
- bool FSkipIfArchiveBitNotSet;
- bool FResetArchiveBitOnZip;
- Classes::TStrings* FExcludeList;
- Classes::TStrings* FNoCompressList;
- TZipComplete FOnZipComplete;
- TStartZipInfo FOnStartZipInfo;
- TStartZipEvent FOnStartZip;
- TDisposeEvent FOnDisposeFile;
- TEndZipFileEvent FOnEndZip;
- TDeleteEvent FOnDeleteEntry;
- TNoSuchFileEvent FOnNoSuchFile;
- TUpdateEvent FOnUpdate;
- TPrepareNextDisk FOnPrepareNextDisk;
- TOnRecursingFile FOnRecursingFile;
- __int64 AmountWritten;
- __int64 AmountToWrite;
- bool UsingTempFile;
- bool CreatingSFX;
- Kplib::TLFNFileStream* SFXStubFile;
- bool FPreserveStubs;
- bool FAddDirEntries;
- Word FFileOpenMode;
-
- protected:
- Classes::TStream* zfile;
- Classes::TStream* IFile;
- Classes::TStream* mfile;
- AnsiString IFileName;
- int isize;
- Kpzipobj::TSortedZip* tmpfiles;
- Kpzipobj::TSortedZip* tmpfiles2;
- Kpzipobj::TEndCentral* tmpecrec;
- Kpzipobj::TZipHeaderInfo* tmpfile_info;
- AnsiString tmpZipName;
- AnsiString mZipName;
- bool Deleting;
- int FileBytes;
- AnsiString SaveNewName;
- ct_data static_ltree[288];
- ct_data static_dtree[30];
- Word bl_count[16];
- int base_dist[30];
- Byte length_code[256];
- Byte dist_code[512];
- int base_length[29];
- bool TRInitialized;
- Byte *window;
- Word *prev;
- Word *head;
- Byte *l_buf;
- Word *d_buf;
- Byte *flag_buf;
- int __fastcall zfwrite(Windows::PByte buf, int item_size, int nb);
- Byte __fastcall zencode(Byte c);
- int __fastcall file_read(Windows::PByte w, Word size);
- void __fastcall CreateTempZip(void);
- int __fastcall Deflate(void);
- int __fastcall ProcessFiles(void);
- bool __fastcall AddFileToZip(AnsiString FName);
- void __fastcall MoveFile(int Index);
- void __fastcall MoveTempFile(void);
- void __fastcall StaticInit(void);
- void __fastcall CryptHead(AnsiString passwrd);
- virtual void __fastcall SetZipName(AnsiString ZName);
- bool __fastcall GetIsModified(void);
- void __fastcall SetMultiZipInfo(TMultiZipInfo* Value);
- virtual bool __fastcall GetCheckDiskLabels(void);
- void __fastcall SetStoreVolumes(bool Value);
- virtual Vclunzip::TMultiMode __fastcall GetMultiMode(void);
- virtual void __fastcall SetCheckDiskLabels(bool Value);
- virtual void __fastcall SetMultiMode(Vclunzip::TMultiMode Value);
- void __fastcall ResetArchiveBit(AnsiString AFileName);
- __int64 __fastcall DiskRoom(void);
- __int64 __fastcall RoomLeft(void);
- void __fastcall NextPart(void);
- void __fastcall LabelDisk(void);
- void __fastcall SaveZipInfoToFile(AnsiString Filename);
- void __fastcall SetDateTime(int Index, System::TDateTime DT);
- void __fastcall SetPathname(int Index, AnsiString Value);
- void __fastcall SetFilename(int Index, AnsiString Value);
- void __fastcall SetStorePaths(bool Value);
- void __fastcall SetRelativePaths(bool Value);
- AnsiString __fastcall TemporaryPath(void);
- void __fastcall SetExcludeList(Classes::TStrings* Value);
- void __fastcall SetNoCompressList(Classes::TStrings* Value);
- bool __fastcall IsInExcludeList(AnsiString N);
- bool __fastcall IsInNoCompressList(AnsiString N);
- virtual void __fastcall Loaded(void);
-
- public:
- __fastcall virtual TVCLZip(Classes::TComponent* AOwner);
- __fastcall virtual ~TVCLZip(void);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- int __fastcall Zip(void);
- int __fastcall DeleteEntries(void);
- void __fastcall SaveModifiedZipFile(void);
- int __fastcall ZipFromStream(Classes::TStream* theStream, AnsiString FName);
- int __fastcall FixZip(AnsiString InputFile, AnsiString OutputFile);
- void __fastcall MakeSFX(AnsiString SFXStub, bool ModHeaders);
- int __fastcall MakeNewSFX(AnsiString SFXStub, AnsiString FName, char * Options, int OptionsLen);
- int __fastcall ZipFromBuffer(char * Buffer, int Amount, AnsiString FName);
- void __fastcall SFXToZip(bool DeleteSFX);
- __property System::TDateTime DateTime[int Index] = {read=GetDateTime, write=SetDateTime};
- __property AnsiString FileComment[int Index] = {read=GetFileComment, write=SetFileComment};
- __property AnsiString ZipComment = {read=GetZipComment, write=SetZipComment};
- __property bool IsModified = {read=GetIsModified, nodefault};
- __property bool CheckDiskLabels = {read=GetCheckDiskLabels, write=SetCheckDiskLabels, nodefault};
- __property Vclunzip::TMultiMode MultiMode = {read=GetMultiMode, write=SetMultiMode, nodefault};
- __property AnsiString Pathname[int Index] = {read=GetPathname, write=SetPathname};
- __property AnsiString Filename[int Index] = {read=GetFilename, write=SetFilename};
- __property bool PreserveStubs = {read=FPreserveStubs, write=FPreserveStubs, default=0};
- __property Word FileOpenMode = {read=FFileOpenMode, write=FFileOpenMode, default=64};
-
- __published:
- __property int PackLevel = {read=FPackLevel, write=FPackLevel, default=6};
- __property bool Recurse = {read=FRecurse, write=FRecurse, default=0};
- __property bool Dispose = {read=FDispose, write=FDispose, default=0};
- __property bool StorePaths = {read=FStorePaths, write=SetStorePaths, default=0};
- __property bool RelativePaths = {read=FRelativePaths, write=SetRelativePaths, default=0};
- __property bool StoreVolumes = {read=FStoreVolumes, write=SetStoreVolumes, default=0};
- __property TZipAction ZipAction = {read=FZipAction, write=FZipAction, default=0};
- __property TMultiZipInfo* MultiZipInfo = {read=FMultiZipInfo, write=SetMultiZipInfo};
- __property bool Store83Names = {read=FStore83Names, write=FStore83Names, default=0};
- __property AnsiString TempPath = {read=FTempPath, write=FTempPath};
- __property bool SkipIfArchiveBitNotSet = {read=FSkipIfArchiveBitNotSet, write=FSkipIfArchiveBitNotSet
- , default=0};
- __property bool ResetArchiveBitOnZip = {read=FResetArchiveBitOnZip, write=FResetArchiveBitOnZip, default=0
- };
- __property Classes::TStrings* ExcludeList = {read=FExcludeList, write=SetExcludeList};
- __property Classes::TStrings* NoCompressList = {read=FNoCompressList, write=SetNoCompressList};
- __property bool AddDirEntriesOnRecurse = {read=FAddDirEntries, write=FAddDirEntries, default=0};
- __property TStartZipEvent OnStartZip = {read=FOnStartZip, write=FOnStartZip};
- __property TStartZipInfo OnStartZipInfo = {read=FOnStartZipInfo, write=FOnStartZipInfo};
- __property TEndZipFileEvent OnEndZip = {read=FOnEndZip, write=FOnEndZip};
- __property TDisposeEvent OnDisposeFile = {read=FOnDisposeFile, write=FOnDisposeFile};
- __property TDeleteEvent OnDeleteEntry = {read=FOnDeleteEntry, write=FOnDeleteEntry};
- __property TNoSuchFileEvent OnNoSuchFile = {read=FOnNoSuchFile, write=FOnNoSuchFile};
- __property TZipComplete OnZipComplete = {read=FOnZipComplete, write=FOnZipComplete};
- __property TUpdateEvent OnUpdate = {read=FOnUpdate, write=FOnUpdate};
- __property TPrepareNextDisk OnPrepareNextDisk = {read=FOnPrepareNextDisk, write=FOnPrepareNextDisk}
- ;
- __property TOnRecursingFile OnRecursingFile = {read=FOnRecursingFile, write=FOnRecursingFile};
- };
-
-
- //-- var, const, procedure ---------------------------------------------------
- extern PACKAGE void __fastcall Register(void);
-
- } /* namespace Vclzip */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Vclzip;
- #endif
- #pragma option pop // -w-
- #pragma option pop // -Vx
-
- #pragma delphiheader end.
- //-- end unit ----------------------------------------------------------------
- #endif // VCLZip
-